import anim.Matrix3D;
import com.sun.javafx.geom.Vec3d;
import sequencing.BoneInfo;
import sequencing.GameObject;

import java.util.Map;

public class DaeTest
{
    public static void main(String[] args) throws Exception
    {
    }


    private static void printAll(GameObject object, Map<String, BoneInfo> boneInfoMap)
    {

        for (GameObject child : object.children)
        {
            if (child != null && child.name != null)
            {
                System.out.println(child.level + "," + child.name + "," + (boneInfoMap.get(child.name).animFragments == null ? "false" : "true"));
            }
            printAll(child, boneInfoMap);
        }
    }


    private static Vec3d extractRotationFromMatrixWithRotationZYX(Matrix3D fragData)
    {
        Vec3d re = new Vec3d();
        re.x = Math.atan2(-fragData.data[1][2], fragData.data[2][2]);
        re.y = Math.asin(fragData.data[0][2]);
        re.z = Math.atan2(-fragData.data[0][1], fragData.data[0][0]);
        return re;
    }

    private static Vec3d extractRotationFromMatrixWithRotationXYZ(Matrix3D fragData)
    {
        Vec3d re = new Vec3d();
        re.x = Math.atan2(fragData.data[2][1], fragData.data[2][2]);
        re.y = Math.asin(-fragData.data[2][0]);
        re.z = Math.atan2(fragData.data[1][0], fragData.data[0][0]);
        return re;
    }

    private static Vec3d extractTransformFromMatrix(Matrix3D fragData)
    {
        return new Vec3d(fragData.data[0][3], fragData.data[1][3], fragData.data[2][3]);
    }

}
